package Thread;

public class Demo07 {
//    private static boolean isQuit = false;
    public static void main(String[] args) throws InterruptedException {
        boolean isQuit = false;
        Thread t = new Thread(()->{
            while (!isQuit) {
                System.out.println("线程进行ing");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        t.start();
        Thread.sleep(5000);
//        isQuit = true;
        System.out.println("线程结束");
    }
}
